<template v-if="x.type === 'BaseSearch'">
	<view style="" :style="[x._outerStyle]" class="grid-container">
	  <view style="" :style="[x._interStyle]">
		<uv-search placeholder="请输入搜索内容" v-model="keyword" :boxStyle="x._inputStyle" @click="goto.search()" :showAction="false" shape="square"
			:color="x.inputStyle.color" @search="confirm" bgColor="rgba(255,255,255,0)">
			<template #prefix>
				<view class="tn-round tn-m-xs" v-if="x.interStyle.vLogo">
					<uv-image width="50rpx" height="50rpx" :src='x.interStyle.vLogo' :lazy-load="true" shape="circle" />
				</view>
			</template>
		</uv-search>
	  </view>
	</view>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
	props: {
		x: {
			type: Object,
			required: true
		},
		modelValue: {
			type: String,
			default: ''
		}
	},
	emits: ['search', 'update:modelValue'],
	data() {
		return {
			keyword: ''
		}
	},
	methods: {
		confirm() {
			this.$emit('search', this.keyword)
			this.$emit('update:modelValue', this.keyword)
		}
	}
})
</script>